\(\int \frac {\log ^2(\frac {c x}{a+b x})}{x (a+b x)} \, dx\) [89]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [B] (verification not implemented)
   Giac [F]
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 24, antiderivative size = 20 \[ \int \frac {\log ^2\left (\frac {c x}{a+b x}\right )}{x (a+b x)} \, dx=\frac {\log ^3\left (\frac {c x}{a+b x}\right )}{3 a} \]

[Out]

1/3*ln(c*x/(b*x+a))^3/a

Rubi [A] (verified)

Time = 0.05 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {2562, 2339, 30} \[ \int \frac {\log ^2\left (\frac {c x}{a+b x}\right )}{x (a+b x)} \, dx=\frac {\log ^3\left (\frac {c x}{a+b x}\right )}{3 a} \]

[In]

Int[Log[(c*x)/(a + b*x)]^2/(x*(a + b*x)),x]

[Out]

Log[(c*x)/(a + b*x)]^3/(3*a)

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2339

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/(x_), x_Symbol] :> Dist[1/(b*n), Subst[Int[x^p, x], x, a + b*L
og[c*x^n]], x] /; FreeQ[{a, b, c, n, p}, x]

Rule 2562

Int[((A_.) + Log[(e_.)*((a_.) + (b_.)*(x_))^(n_.)*((c_.) + (d_.)*(x_))^(mn_)]*(B_.))^(p_.)*((f_.) + (g_.)*(x_)
)^(m_.)*((h_.) + (i_.)*(x_))^(q_.), x_Symbol] :> Dist[(b*c - a*d)^(m + q + 1)*(g/b)^m*(i/d)^q, Subst[Int[x^m*(
(A + B*Log[e*x^n])^p/(b - d*x)^(m + q + 2)), x], x, (a + b*x)/(c + d*x)], x] /; FreeQ[{a, b, c, d, e, f, g, h,
 i, A, B, n, p}, x] && EqQ[n + mn, 0] && IGtQ[n, 0] && NeQ[b*c - a*d, 0] && EqQ[b*f - a*g, 0] && EqQ[d*h - c*i
, 0] && IntegersQ[m, q]

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {\log ^2(c x)}{x} \, dx,x,\frac {x}{a+b x}\right )}{a} \\ & = \frac {\text {Subst}\left (\int x^2 \, dx,x,\log \left (\frac {c x}{a+b x}\right )\right )}{a} \\ & = \frac {\log ^3\left (\frac {c x}{a+b x}\right )}{3 a} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.11 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.00 \[ \int \frac {\log ^2\left (\frac {c x}{a+b x}\right )}{x (a+b x)} \, dx=\frac {\log ^3\left (\frac {c x}{a+b x}\right )}{3 a} \]

[In]

Integrate[Log[(c*x)/(a + b*x)]^2/(x*(a + b*x)),x]

[Out]

Log[(c*x)/(a + b*x)]^3/(3*a)

Maple [A] (verified)

Time = 1.08 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.95

method result size
derivativedivides \(\frac {\ln \left (\frac {c x}{b x +a}\right )^{3}}{3 a}\) \(19\)
default \(\frac {\ln \left (\frac {c x}{b x +a}\right )^{3}}{3 a}\) \(19\)
norman \(\frac {\ln \left (\frac {c x}{b x +a}\right )^{3}}{3 a}\) \(19\)
risch \(\frac {\ln \left (\frac {c x}{b x +a}\right )^{3}}{3 a}\) \(19\)
parallelrisch \(\frac {\ln \left (\frac {c x}{b x +a}\right )^{3}}{3 a}\) \(19\)

[In]

int(ln(c*x/(b*x+a))^2/x/(b*x+a),x,method=_RETURNVERBOSE)

[Out]

1/3*ln(c*x/(b*x+a))^3/a

Fricas [A] (verification not implemented)

none

Time = 0.33 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.90 \[ \int \frac {\log ^2\left (\frac {c x}{a+b x}\right )}{x (a+b x)} \, dx=\frac {\log \left (\frac {c x}{b x + a}\right )^{3}}{3 \, a} \]

[In]

integrate(log(c*x/(b*x+a))^2/x/(b*x+a),x, algorithm="fricas")

[Out]

1/3*log(c*x/(b*x + a))^3/a

Sympy [A] (verification not implemented)

Time = 0.06 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.70 \[ \int \frac {\log ^2\left (\frac {c x}{a+b x}\right )}{x (a+b x)} \, dx=\frac {\log {\left (\frac {c x}{a + b x} \right )}^{3}}{3 a} \]

[In]

integrate(ln(c*x/(b*x+a))**2/x/(b*x+a),x)

[Out]

log(c*x/(a + b*x))**3/(3*a)

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 141 vs. \(2 (18) = 36\).

Time = 0.21 (sec) , antiderivative size = 141, normalized size of antiderivative = 7.05 \[ \int \frac {\log ^2\left (\frac {c x}{a+b x}\right )}{x (a+b x)} \, dx=-{\left (\frac {\log \left (b x + a\right )}{a} - \frac {\log \left (x\right )}{a}\right )} \log \left (\frac {c x}{b x + a}\right )^{2} - \frac {{\left (c \log \left (b x + a\right )^{2} - 2 \, c \log \left (b x + a\right ) \log \left (x\right ) + c \log \left (x\right )^{2}\right )} \log \left (\frac {c x}{b x + a}\right )}{a c} - \frac {c^{2} \log \left (b x + a\right )^{3} - 3 \, c^{2} \log \left (b x + a\right )^{2} \log \left (x\right ) + 3 \, c^{2} \log \left (b x + a\right ) \log \left (x\right )^{2} - c^{2} \log \left (x\right )^{3}}{3 \, a c^{2}} \]

[In]

integrate(log(c*x/(b*x+a))^2/x/(b*x+a),x, algorithm="maxima")

[Out]

-(log(b*x + a)/a - log(x)/a)*log(c*x/(b*x + a))^2 - (c*log(b*x + a)^2 - 2*c*log(b*x + a)*log(x) + c*log(x)^2)*
log(c*x/(b*x + a))/(a*c) - 1/3*(c^2*log(b*x + a)^3 - 3*c^2*log(b*x + a)^2*log(x) + 3*c^2*log(b*x + a)*log(x)^2
 - c^2*log(x)^3)/(a*c^2)

Giac [F]

\[ \int \frac {\log ^2\left (\frac {c x}{a+b x}\right )}{x (a+b x)} \, dx=\int { \frac {\log \left (\frac {c x}{b x + a}\right )^{2}}{{\left (b x + a\right )} x} \,d x } \]

[In]

integrate(log(c*x/(b*x+a))^2/x/(b*x+a),x, algorithm="giac")

[Out]

integrate(log(c*x/(b*x + a))^2/((b*x + a)*x), x)

Mupad [B] (verification not implemented)

Time = 1.39 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.90 \[ \int \frac {\log ^2\left (\frac {c x}{a+b x}\right )}{x (a+b x)} \, dx=\frac {{\ln \left (\frac {c\,x}{a+b\,x}\right )}^3}{3\,a} \]

[In]

int(log((c*x)/(a + b*x))^2/(x*(a + b*x)),x)

[Out]

log((c*x)/(a + b*x))^3/(3*a)